import { Component,OnInit } from '@angular/core';
import { PokemonService } from '../pokemon/pokemon.service';
import { Global } from 'src/global';
import { Pokemon } from '../pokemon/pockemon';
import { jsDocComment } from '@angular/compiler';
@Component({
  selector: 'app-tset',
  templateUrl: './tset.component.html',
  styleUrls: ['./tset.component.css']
})
export class TsetComponent implements OnInit  {
  constructor(private pokemonService:PokemonService) { }
  login_user=Global.user;
  pokemons= new Array<Pokemon>
  ngOnInit(): void {
  this.pokemonService.get_user(this.login_user.username).subscribe((res) => {
    if (res['status'] == 'ok') {
      this.login_user = res['data'];

      this.pokemons= res['data']['col_lis']

      console.log(this.pokemons)
    }
  });
}

}
